<?php
$this->title = "Edit Order";
$this->headTitle($this->title);
$total;
?>

Order No : <?php echo $this->orders->order_no; ?> <br />
Order Date : <?php echo $this->orders->order_date; ?><br />
Staff Number : <?php echo $this->orders->staff_no;?><br />
Staff Name : <?php echo $this->staffs->staff_name; ?><br />
Customer Number: <?php echo $this->orders->cust_no; ?> <br />
Customer Name: <?php echo $this->customers->cust_title?>. <?php echo $this->customers->cust_first_name?> <?php echo $this->customers->cust_last_name?><br />
Customer Address:<?php echo $this->customers->cust_address?> <br />

<br />

<?php foreach($this->dbs as $db) : ?>
<table>
<tr>
	<th>Product ID</th>    
	<th>Product Name</th>	
	<th>Item Status</th>	
	<th>Price</th>			
	<th>Qty</th>			
	<th>Total Price</th>	
	<th>&nbsp;</th>
</tr>
<tr>
	<td><?php echo $this->escape($db->prod_no); ?></td>
	<td><?php echo $this->escape($db->prod_name)?></td>
	<td><?php echo $this->escape($db->item_status); ?></td>
	<td>$<?php echo $this->escape($db->prod_price)?></td>
	<td><?php echo $this->escape($db->item_qty); ?></td>
	<td>$<?php echo $this->escape($db->item_total_price);?></td>
	<td><a href="<?php echo $this->url(array('controller'=>'item', 'action'=>'icancel', 'item_no'=>$db->item_no, 'item_status'=>$db->item_status, 'item_total_price'=>$db->item_total_price, 'order_no'=>$db->order_no, 'prod_no'=>$db->prod_no, 'item_qty'=>$db->item_qty+$db->prod_qty))?>">Cancel</a></td>
	<?php $total += $this->escape($db->item_total_price);?>
</tr>
</table>
<?php endforeach;?>
Total Price : <?php echo $total;?><a href="<?php echo $this->url(array('controller'=>'order', 'action'=>'cancel', 'order_no'=>$db->order_no, 'order_status'=>$db->order_status))?>">Cancel</a>

